IMotion.MoveAxisAbsolute method
Commands a controlled motion to a specified absolute position.
Namespace: IntervalZero.KINGSTAR.Base.ApiAssembly: IntervalZero.KINGSTAR.Base.Api (in IntervalZero.KINGSTAR.Base.dll) Version: 4.4.0.0
Syntax
KsCommandStatus MoveAxisAbsolute(
int Index,
double Position,
double Velocity,
double Acceleration,
double Deceleration,
double Jerk,
McDirection Direction,
McBufferMode BufferMode
)Function MoveAxisAbsolute(
Index As Integer,
Position As Double,
Velocity As Double,
Acceleration As Double,
Deceleration As Double,
Jerk As Double,
Direction As McDirection,
BufferMode As McBufferMode
) As KsCommandStatusParameters
Index [in]
Type: int
The index of an axis. Indexes are zero based. Aliases affect this parameter.
Position [in]
Type: double
The target position for the motion. [unit] (negative or positive)
Velocity [in]
Type: double
A value of the maximum velocity. Not necessarily reached if the target position is close. [unit/second]
Acceleration [in]
Type: double
A value of the acceleration. Always positive. The unit is determined by McProfileType. (increasing power of the motor) [unit/second2] or [second]
Deceleration [in]
Type: double
A value of the deceleration. Always positive. The unit is determined by McProfileType. (decreasing power of the motor) [unit/second2] or [second]
Jerk [in]
Type: double
A value of the jerk. Always positive. The unit is determined by McProfileType. [unit/second3] or [second]
Direction [in]
Type: McDirection
The moving direction of an axis.
BufferMode [in]
Type: McBufferMode
Defines how to blend the velocity of two methods.
Return value
Type: KsCommandStatus
Returns the KsCommandStatus class.
Remarks
- If this command is aborted, the untraveled distance will be abandoned.
- This action completes with velocity zero if no further actions are pending.
- If there is only one mathematical solution to reach the commanded position (like in linear systems), the value of the input Direction is ignored.
- For modulo axis, valid absolute position values are in the range of [0, 360), or corresponding range. The application however may shift the "commanded position" of MoveAxisAbsolute into the corresponding modulo range.
- The enum type
mcShortestWayfocuses on a trajectory that goes through the shortest route. The decision which direction to go is based on the current position where the command is sent. - For more information about how the blending modes work, see Concepts > Blend movements.
- When modulo axis is enabled, the modulo value will be applied to the Position parameter and the axis will move according to the configured Direction.
For example, with a modulo value of 360, when Direction is set to:- mcShortestWay / mcCurrentDirection: The axis takes the shortest distance to reach the target. If there is a tie, the axis will move in the positive direction to reach the target. For example, if the current position is 0 and the target position is 340, the axis will move -20 to reach the target position, and the final position will be 340.
- mcPositiveDirection: The axis moves in the positive direction to reach the target. For example, if the current position is 0 and the target position is -20, the axis will move 340 to reach the target position.
- mcNegativeDirection: The axis moves in the negative direction to reach the target. For example, if the current position is 0 and the target position is 20, the axis will move -340 to reach the target position, and the final position will be 20.
Examples
N/ASee also